package com.restcloud.pojo.Public;

import com.restcloud.pojo.Public.Value;
import lombok.Data;

import javax.xml.bind.annotation.*;
import java.util.List;

@XmlAccessorType(XmlAccessType.FIELD)
@Data
public class Name {

    public Name() {
    }

    public Name(String xsiType) {
        this.xsiType = xsiType;
    }

    public Name(String xsiType, String valueTrue) {
        this.xsiType = xsiType;
        this.valueTrue = valueTrue;
    }

    @XmlAttribute(name = "xsi:type")
    private String xsiType;

    @XmlAttribute(name = "value")
    private String valueTrue;

    @XmlElementWrapper(name = "item")
    @XmlElement(name = "part")
    private List<Value> item;

    @XmlElement(name = "item")
    private Value value;

    public String getXsiType() {
        return xsiType;
    }

    public void setXsiType(String xsiType) {
        this.xsiType = xsiType;
    }

    public String getValueTrue() {
        return valueTrue;
    }

    public void setValueTrue(String valueTrue) {
        this.valueTrue = valueTrue;
    }

    public List<Value> getItem() {
        return item;
    }

    public void setItem(List<Value> item) {
        this.item = item;
    }

    public Value getValue() {
        return value;
    }

    public void setValue(Value value) {
        this.value = value;
    }
}
